from nltk.corpus import  wordnet as wn

x=wn.synset("cat.n.01")
y=wn.synset("lynx.n.01")

print(x.path_similarity(y))